/**
 * 
 */
package com.gopay.remote.user;

import java.io.Serializable;
import java.util.Map;

import com.gopay.common.domain.UserInfo;
import com.gopay.common.domain.cloud.CloudCustAcctRel;
import com.gopay.common.domain.cloud.CloudCustCorpCert;
import com.gopay.common.domain.cloud.CloudCustInfoLog;
import com.gopay.common.domain.cps.cloud.Cloud01802Vo;
import com.gopay.common.domain.cust.CustCorpInfo;
import com.gopay.common.domain.cust.CustPersonInfo;
import com.gopay.common.domain.user.LoginVoBean;
import com.gopay.common.domain.user.PwdCtrlAttrInfo;
import com.gopay.common.domain.user.WALoginVO;
import com.gopay.common.exception.CPSException;


/**
 * 新增和修改、删除用户接口
 * @UserRemoteService.java
 * @author xiefei
 * @2013-2-27 下午4:57:27  www.gopay.com.cn Inc.All rights reserved.
 */
public interface UserRemoteService extends Serializable{

    /**
     * 新增企业客户
     * @param custCorpInfo
     * @param userInfo
     * @return 返回操作员ID
     */
    public UserInfo saveCustCorpUser(CustCorpInfo custCorpInfo,UserInfo userInfo);
    
    
    /**
     * 新增个人客户
     * @param custPersonInfo
     * @param userInfo
     * @throws Exception 
     */
    public UserInfo saveCustPersonUser(CustPersonInfo custPersonInfo,UserInfo userInfo) throws CPSException;
    
    
    /**
     * 修改企业客户信息
     * @param custCorpInfo
     * @param userInfo
     */
    public void editCustCorpUser(CustCorpInfo custCorpInfo,UserInfo userInfo);
    
    /**
     * 修改企业客户信息
     * @param custCorpInfo
     */
    public void editCustCorpUser(CustCorpInfo custCorpInfo);
    
    
    /**
     * 修改个人客户信息
     * @param custCorpInfo
     * @param userInfo
     */
    public void editCustPersonUser(CustPersonInfo custPersonInfo,UserInfo userInfo);
    
    /**
     * 修改用户信息
     * @param userInfo
     */
    public void editUserInfo(UserInfo userInfo);
    
    
    /**
     * 增加用户
     * @param userInfo
     * @return
     */
    public String saveUserInfo(UserInfo userInfo);
    
    /**
     * 用户登录
     * @param email
     * @param userType
     * @param oprId
     * @param Ip
     * @return
     */
    public LoginVoBean getLogin(String email,String userType,String pwd, String oprId,String Ip,String fingerInfo,String sessionId);
    
    /**
     * 修改个人客户信息
     * @param custCorpInfo
     * @param userInfo
     */
    public void editCustPersonUser(CustPersonInfo custPersonInfo);
    
    /**
     * 增加个人客户
     * @param custPersonInfo
     * @return
     */
    public CustPersonInfo saveCustPersonUser(CustPersonInfo custPersonInfo);
    
    /**
     * 增加企业客户
     * @param custCorpInfo
     * @return
     */
    public CustCorpInfo saveCustCorpUser(CustCorpInfo custCorpInfo);
    /**
     * 修改企业客户信息
     * @param custCorpInfo
     * @param userInfo
     */
    public void editCustCorpInfo(CustCorpInfo custCorpInfo);
    /**
     * 修改个人客户信息
     * @param custCorpInfo
     * @param userInfo
     */
    public void editCustPersonInfo(CustPersonInfo custPersonInfo);
    
    /**
     * 用户清零
     * @param userInfo
     */
    public void clearUserInfo();

    /**
     * 更新用户手机号码
     * @param mobileNo
     */
    public void updateCustPersonMobileNo(String custId,String mobileNo);
    
    /**
     * 根据手机号查询个人用户
     * @param mobileNo
     * @return 
     */
    public CustPersonInfo findCustByPersonMobileNo(String mobileNo);
    
    /**
     * 手机登录
     * @param waLoginVo
     * @return
     */
    public LoginVoBean getWALogin(WALoginVO waLoginVo);
    /**
     * 根据cust_id查询user_info表中的信息
     * @param mobileNo
     * @return 
     */
    public UserInfo findUserInfoByCustPersonInfoId(String custID);
    
    /**
     * 校验是否开通动态口令
     * @param userName
     * @return
     */
    public Boolean isOpenDCToken(String userName);

    /**
     * 校验是否开通动态口令,通过操作员ID
     * @param userName
     * @return
     */
    public Boolean isOpenDCTokenbyUserId(String userName,String opr);
    

    /**
     * 校验是否开通动态口令登陆
     * @param userName userType
     * @return
     */
    public Boolean isShowToken(String userName,String userType);
    /**
     * 创建账户
     * @param custId
     * @param acctName
     */
    public void saveAcctPersonUser(String custId,String acctName)throws CPSException;;
    

    /**
     * 新增生钱包个人客户
     * @param custPersonInfo
     * @param userInfo
     * @throws Exception 
     */
    public UserInfo saveSQBCustPersonUser(CustPersonInfo custPersonInfo,UserInfo userInfo) throws CPSException;
    /**
     * 新增生钱包专属账户
     * @param custPersonInfo
     * @param userInfo
     * @throws CPSException
     */
    public void saveSQBAcct(CustPersonInfo custPersonInfo) throws CPSException;
    /**
     * 新增普通账户
     * @param custPersonInfo
     * @throws CPSException 
     */
    public void creatGNSTAcct(CustPersonInfo custPersonInfo) throws CPSException;

    /**
     * 
     * 保存用户和短信验证
     * @param userInfo
     * @return 
     * @author hougn
     */
    String saveUserInfoAndSmsAc(UserInfo userInfo);
    
    /**
     * 云账户开户操作
     * @Description
     * @param userInfo
     * @param custCorpInfo
     * @param cloudCustAcctRel
     * @param cert
     * @return
     * @throws CPSException 
     * @author jiaoshuai
     */
    public UserInfo createCloudAcct(UserInfo userInfo, CustCorpInfo custCorpInfo, CloudCustAcctRel cloudCustAcctRel, CloudCustCorpCert cert, CloudCustInfoLog log) throws CPSException;

    /**
     * 云账户开账户操作
     * @Description
     * @param userInfo
     * @param custCorpInfo
     * @param cloudCustAcctRel
     * @param cert
     * @return
     * @throws CPSException 
     * @author jiaoshuai
     */
    public UserInfo cloudOpenAcct(UserInfo userInfo, CustCorpInfo custCorpInfo, CloudCustAcctRel cloudCustAcctRel, CloudCustCorpCert cert, CloudCustInfoLog log) throws CPSException;

    /**
     * 云账户开账户操作（新）
     * @author shaozhengda
     */
    public CloudCustAcctRel cloudOpenAcct(String merId,String merCustId,String custType,Object object) throws CPSException;

    
    /**
     * 云账户后台开户操作
     * @param cloud01802Vo
     * @return
     * @throws CPSException
     */
    Map<String,Object> cloudBackRegister(Cloud01802Vo cloud01802Vo) throws CPSException;
    

    /**
     * @Description 根据主键获取个人客户
     * @Author jianghoupeng
     * @Date 2016/11/4 10:59
     */
    CustPersonInfo selectPersonByKey(String custId);

    /**
     * @Description 根据主键获取企业客户
     * @Author jianghoupeng
     * @Date 2016/11/4 11:00
     */
    CustCorpInfo selectCustByKey(String custId);

    /**
     * @param loginId
     * @return
     * @Desc 根据登录号查询个人custId
     * @Date 2016/11/28 15:32 by xuexj
     */
    String selectPersonCustIdsByLoginId(String loginId,String custName,String certType);

    /**
     * @param loginId
     * @return
     * @Desc 根据登录号查询企业custId
     * @Date 2016/11/28 15:34 by xuexj
     */
    String selectCorpCustIdsByLoginId(String loginId,String custName,String certType);

    /**
     * 保存密码控件的用户记录
     * @author <a href="mailto:yhwpeng@126.com">wangdong</a>
     * @date 2017-01-08 22:42:09
     */
    Integer saveMicroPwdCtrl(PwdCtrlAttrInfo info);

    /**
     * 获取控件信息
     * @author <a href="mailto:yhwpeng@126.com">wangdong</a>
     * @date 2017-05-05 15:23:34
     */
    PwdCtrlAttrInfo findMicroPwdCtrl(Integer id);

    /**
     * 校验是否高危商户
     * @author <a href="mailto:yhwpeng@126.com">wangdong</a>
     * @date 2017-04-25 11:30:37
     */
    Boolean checkIsSuspicion(String email);



    /**
     * 掌合天下批量用户导入操作
     * @param cloud01802Vo
     * @return
     * @throws CPSException
     */
    Map<String,Object> batchImport(Cloud01802Vo cloud01802Vo) throws CPSException;


}
